package br.edu.ufcg.dsc.compiladores.validation;


import java.util.HashMap;
import java.util.Map;

import org.eclipse.emf.ecore.EObject;

public class TabelaDeSimbolos {
	public static TabelaDeSimbolos INSTANCE = new TabelaDeSimbolos();
	private Map<EObject, Object> constValues;
	private Map<EObject, String> types;
	
	private TabelaDeSimbolos(){
		constValues = new HashMap<EObject, Object>();
		types = new HashMap<EObject, String>();
	}
	public void putType(EObject node, String type){
		types.put(node, type);
	}
	public String getType(EObject node){
		return types.get(node);
	}
	
	public void put(EObject constant, Object value){
		constValues.put(constant, value);
	}
	
	public Object get(EObject constant){
		return constValues.get(constant);
	}
	
	public static TabelaDeSimbolos getInstance(){
		return INSTANCE;
	}
	
}
